package com.yz.design.responsibilityDegin;

public class AResponsibility extends AbstractMessageResponsibility<Message> {
    @Override
    public void doSomething(Message message) {
        if ("A".equals(message.getTag())) {
            System.out.println("A does something");
            System.out.println(message.toString());
            return;
        }
        //当前没法处理，回调回去，让下一个去处理
        nextHandler.doSomething(message);
    }
}